public class Ex4_19{
	public static void main(String[] args){
		final int line = 8;
		for (int i = 1; i <= line; i++){
			for (int j = 1; j <= line - i; j++)
				System.out.printf("%4c", ' ');
			int t = 1;
			for (int j = 1; j <= i; j++){
				System.out.printf("%4d", t);
				t *= 2;
			}
			t /= 2;
			for (int j = 1; j <= i-1; j++){
				t /= 2;
				System.out.printf("%4d", t);
			}
			System.out.printf("\n");
		}
	}
}